<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			// 初始化登录状态
			this.$store.commit('initUser')
			// 更新购物车数据
			this.$store.dispatch('updateCartList')
			// 监听购物车更新
			uni.$on('updateCart', () => {
				this.$store.dispatch('updateCartList')
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import "common/uni.css";
	@import "common/animate.css";
	@import "common/icon.css";
	@import "common/common.css";
	@import "common/zcm-main.css";
</style>
